package com.ydcloud.${packageName}.service;

import java.util.List;
import java.util.Map;
import java.util.HashMap;

import com.hcloud.exception.ServiceException;
import com.hcloud.page.Page;

import com.ydcloud.${packageName}.domain.criteria.${jName}Criteria;
import com.ydcloud.${packageName}.domain.${jName};

/*********************************************************************************************************
 * Copyright (c) 个人
 * All rights reserved.
 *
 * 文件名称:public class ${jName}Service{ } 
 * 
 * 摘    要： 
 * 版    本：1.0
 * 作    者：${createBy}
 * 创建于：${createDate}
 * 最后修改时间：
 * 
*********************************************************************************************************/
public interface ${jName}Service {

	long countByCriteria(${jName}Criteria example);
    
    int countPage(Map<String, Object> map);
    
    List<${jName}> queryPageList(Map<String,Object> map);

    int deleteByCriteria(${jName}Criteria example);

    int deleteByPrimaryKey(Long id);

    int insert(${jName} record);
    
    void batchInsert(List<${jName}> list);

    int insertSelective(${jName} record);

    List<${jName}> selectByCriteria(${jName}Criteria example);

    ${jName} selectByPrimaryKey(Long id);

    int updateByCriteriaSelective(${jName} record, ${jName}Criteria example);

    int updateByCriteria(${jName} record,${jName}Criteria example);

    int updateByPrimaryKeySelective(${jName} record);
    
    int updateByIdAndResource(${jName} record);

    int updateByPrimaryKey(${jName} record);
    
    Page<${jName}> query${jName}Page(Integer pageSize,Integer pageNumber,${jName} record) throws ServiceException;
    
    void batchUpdate(List<${jName}> list);
    
    <#if (bpmnIsGenerate)>
    /**
	 * ${jComment}审批流程发起接口
	 * 
	 * @param parameterMap
	 * @return
	 * @throws ServiceException
	 */
	public HashMap<String, Object> startProcess(
			HashMap<String, Object> parameterMap) throws ServiceException;

	/**
	 * 通用${jComment}审批节点
	 * 
	 * @param parameterMap
	 * @return
	 * @throws ServiceException
	 */
	public HashMap<String, Object> checkProcess(
			HashMap<String, Object> parameterMap) throws ServiceException;

	/**
	 * ${jComment}审批驳回编辑节点
	 * 
	 * @param parameterMap
	 * @return
	 * @throws ServiceException
	 */
	public HashMap<String, Object> checkReject(
			HashMap<String, Object> parameterMap) throws ServiceException, Exception;

	/**
	 * ${jComment}统一业务处理方法
	 * 
	 * @param parameterMap
	 * @return
	 * @throws ServiceException
	 */
	public HashMap<String, Object> completeExecuteMethod(
			HashMap<String, Object> parameterMap) throws ServiceException;
			
	</#if>
}